﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class UserControls_CategoriesList : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string departmentId = Request.QueryString["DepartmentID"];
        // Continue only if DepartmentID exists in the query string
        if (departmentId != null)
        {
        DataClassesDataContext da = new DataClassesDataContext();
        DataList1.DataSource = CatalogAccess.GetCategoriesInDepartment(departmentId);
        DataList1.DataBind();
    }}
}